import request from '@/utils/request'

//查询单据
export function listBill(data) {
  return request({
    method: "get",
    url: "/prs/process/list",
    params: data
  })
}

//字典
export function dictMatching(data) {
  return request({
    url: '/system/dict/data/type/' + data,
    method: 'get',
  })
}

// 上一条下一条
export function NextBill(query) {
  return request({
    url: '/prs/process/nextOrLast/',
    method: 'get',
    params: query
  })
}


//新增单据
export function addBill(data) {
  return request({
    method: "post",
    url: "/prs/process",
    data: data
  })
}


// 查看单据
export function seeBill(query) {
  return request({
    url: '/prs/process',
    method: 'get',
    params: query
  })
}

// 更新单据
export function updateBill(data) {
  return request({
    method: "put",
    url: "/prs/process",
    data: data
  })
}

// 删除单据
export function deleteBill(data) {
  return request({
    url: '/prs/process/delete',
    method: 'post',
    data: data
  })
}

//审核单据
export function examineBill(data) {
  return request({
    method: "post",
    url: "/prs/process/check",
    data: data
  })
}

//反审核单据
export function examineDeBill(data) {
  return request({
    method: "post",
    url: "/prs/process/antiCheck",
    data: data
  })
}


//关联物料
export function listLink(query) {
  return request({
    url: '/prs/process/chain',
    method: 'get',
    params: query
  })
}

//订单号查询
export function listCode(query) {
  return request({
    url: '/om/process/pipe/processId',
    method: 'get',
    params: query
  })
}

//模块参数
export function moduleParameters(query) {
  return request({
    url: '/system/config/list',
    method: 'get',
    params: query
  })
}

// 查询标准工序
export function listOperate(query) {
  return request({
    url: '/prs/operate/list',
    method: 'get',
    params: query
  })
}
